package com.boguan.web.controller.pulsar;

import org.apache.pulsar.client.api.Consumer;
import org.apache.pulsar.client.api.Message;
import org.apache.pulsar.client.api.MessageListener;
import org.springframework.stereotype.Component;

//@Component
public class PulsarListener implements MessageListener {
    @Override
    public void received(Consumer consumer, Message msg) {
        String s = new String(msg.getData());
        System.out.println(s);
    }

    @Override
    public void reachedEndOfTopic(Consumer consumer) {

    }
}
